﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace ElasticReflection.Helpers
{
    public static class MethodInfoExtensions
    {
        public static bool CanMakeGenericMethod(this MethodInfo M, Type[] Generics)
        {
            try
            {
                M.MakeGenericMethod(Generics);
                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }
    }
}
